package exception

import (
	"fmt"
	"testing"
)

// 使用示例
func TestAppException_Error(t *testing.T) {
	// 创建异常
	err := NewAppException("404")
	fmt.Println(err)

	errWithMsg := NewAppExceptionWithMessage("500", "Internal Server Error")
	fmt.Println(errWithMsg)

	cause := fmt.Errorf("file not found")
	errWithCause := NewAppExceptionWithCause("400", cause)
	fmt.Println(errWithCause)
}
